function close(){
    var index = parent.layer.getFrameIndex(window.name);
    parent.layer.close(index);
}
layui.use('table', function () {
    var table = layui.table;

    var s = localStorage.getItem("com");

// 点击按钮事件 修改通过状态码
    $("#review").click(function (obj) {
        $.ajax({
            type: 'post',
            url: '/commodityReview/deleteCommodityReview',
            data: {"commodityId": s},
            dataType: 'json',
            success: function (res) {
                if (res.start == 200){
                    layer.msg(res.msg,{time:500,icon:5})
                }
                else {
                    layer.msg(res.msg,{time:500,icon:6})
                }
                // 关闭页面
                var index = parent.layer.getFrameIndex(window.name);
                parent.layer.close(index);
                // 刷新页面
                parent.aa();
            },
            error: function (e) {
                console.log("失败");
                console.log(e);
            }
        })
    })

    $("#reject").click(function (obj) {
        layer.open({
            type: 2,
            title: '驳回理由',
            content: 'reject.html',
            shade:[0.5,'#AFEEEE'],
            anim:4,
            area: ['80%', '80%'],
        })
    })

})